﻿using System;
using System.Collections.Generic;

using System.Windows;
using System.Windows.Controls;

using System.Windows.Input;
using System.Windows.Navigation;

using EagleJournal.Controls;

namespace EagleJournal
{
	public partial class DialogNotif : UserControl
	{
        public static readonly RoutedEvent
            InvokeNotificationCloseButtonEvent = EventManager.RegisterRoutedEvent("InvokeNotificationCloseButton", RoutingStrategy.Direct, typeof(RoutedEventHandler), typeof(DialogNotif));
        public event RoutedEventHandler
            InvokeNotificationCloseButton
        {
            add     { this.AddHandler(InvokeNotificationCloseButtonEvent, value); }
            remove  { this.RemoveHandler(InvokeNotificationCloseButtonEvent, value); }
        }

		public          DialogNotif             ()
		{
			this.InitializeComponent();
		}

        private void    ButtonHide_Click        (object sender, RoutedEventArgs e)
        {
            this.RaiseEvent(new RoutedEventArgs(InvokeNotificationCloseButtonEvent));
        }

        public  void    AddNotif                (string message)
        {
            ListNotifInfo notif = new ListNotifInfo()
            {
                Content = "PO deadline: " + message,
            };

            this.Data.Items.Add(notif);
        }
        public  void    ClearNotif              ()
        {
            this.Data.Items.Clear();
        }

        private void    Data_SelectionChanged   (object sender, SelectionChangedEventArgs e)
        {

        }
	}
}
